package o;

import android.content.res.ColorStateList;
import android.graphics.PorterDuff.Mode;
import android.graphics.drawable.Drawable;
import android.os.Build.VERSION;
import android.widget.AbsSeekBar;
import com.huawei.skinner.annotation.SkinAdapter;
import o.fkp.e;

public class pr {
    @SkinAdapter("thumb")
    public static void ˋ(AbsSeekBar absSeekBar, Drawable drawable) {
        if (VERSION.SDK_INT < 21) {
            Object tag = absSeekBar.getTag(e.ˎ);
            if (tag != null && (tag instanceof ColorStateList)) {
                ColorStateList colorStateList = (ColorStateList) tag;
                drawable = gg.ʻ(drawable).mutate();
                gg.ॱ(drawable, colorStateList);
                gg.ˋ(drawable, Mode.SRC_IN);
            }
        }
        absSeekBar.setThumb(drawable);
    }

    @SkinAdapter("thumbTint")
    public static void ˏ(AbsSeekBar absSeekBar, ColorStateList colorStateList) {
        if (VERSION.SDK_INT >= 21) {
            absSeekBar.setThumbTintList(colorStateList);
            return;
        }
        Drawable thumb = absSeekBar.getThumb();
        if (thumb != null) {
            Drawable mutate = gg.ʻ(thumb).mutate();
            gg.ॱ(mutate, colorStateList);
            gg.ˋ(mutate, Mode.SRC_IN);
            if (thumb != mutate) {
                absSeekBar.setThumb(mutate);
            }
        }
        absSeekBar.setTag(e.ˎ, colorStateList);
    }
}
